import { stringify } from 'qs';
import request from '@/utils/request';

export async function querySite(params) {
  return request('/siteInfo/querySiteInfoListByVenueId', {
    method: 'POST',
    body: {
      ...params
    },
  });
}


export async function removeSite(params) {
  return request(`/siteInfo/delete?${stringify(params)}`);
}

export async function batchRemoveSite(params) {
  return request(`/venueInfo/batchDeleteVenueInfoByIds?${stringify(params, { arrayFormat: 'brackets' })}`);
}

export async function addSite(params) {
  return request('/siteInfo/save', {
    method: 'POST',
    body: {
      ...params
    },
  });
}

export async function updateSite(params) {
  return request('/siteInfo/update', {
    method: 'POST',
    body: {
      ...params
    },
  });
}

